package com.iss.springdemo1.aop;

import com.iss.springdemo1.aop.demo.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Client {
    public static void main(String[] args) {
        /*HelloStrategy helloStrategy = new HelloStrategy2();
        TargetClass targetClass = new TargetClass();
        targetClass.sayHello(helloStrategy);*/

        ConfigurableApplicationContext context = SpringApplication.run(Client.class, args);

       TargetClassProxy targetClass=   context.getBean(TargetClassProxy.class);

        //targetClass.sayHello();
        targetClass.sayHello();
    }
}
